var e = require("../../requests/request.js");

Page({
    data: {
        userList: [],
        method: "vote.userlist",
        pindex: 1,
        psize: 10,
        useragent: "wechat",
        t: ""
    },
    onLoad: function(e) {
        console.log(e);
        var t = e.voteid || "5b432600f5479c175c98786e";
        this.getUserList(t);
    },
    getUserList: function(t) {
        var n = this, o = parseInt(new Date().getTime() / 1e3), i = wx.getStorageSync("opid");
        e.getUserList("vote.userlist", t, i, "wechat", this.data.pindex, this.data.psize, o, function(e) {
            e.Data.length > 0 && e.Data.map(function(e) {
                e.CreatedTime = e.CreatedTime.substring(5, 16).replace("T", " ").replace("-", ".");
            }), n.setData({
                Count: e.Count,
                userList: e.Data
            });
        }, function(e) {}, function(e) {});
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {}
});